package com.linzp.bishe.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.linzp.bishe.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName AllElementServiceImpl
 * @Description 描述
 * @Author LinZePeng
 * @Date 2022/5/4 16:01
 * @Version 1.0
 */
@Service
public class AllElementServiceImpl implements AllElementService {

	@Autowired
	private AchievementTransformationService achievementTransformationService;

	@Autowired
	private DisciplineCompetitionService disciplineCompetitionService;

	@Autowired
	private HprojectService hprojectService;

	@Autowired
	private PaperService paperService;

	@Autowired
	private PatentService patentService;

	@Autowired
	private PublicationsService publicationsService;

	@Autowired
	private ResearchAchievementsService researchAchievementsService;

	@Autowired
	private SoftwareCopyrightService softwareCopyrightService;

	@Autowired
	private TeachingRewardService teachingRewardService;

	@Autowired
	private ZprojectService zprojectService;

	@Autowired
	private MeetingService meetingService;

	@Override
	public List<Integer> getAllCount(boolean chek,Integer id) {
		List<Integer> list = new ArrayList<>();
		QueryWrapper queryWrapper = new QueryWrapper();
		if(chek) queryWrapper.eq("user_id",id);
		list.add(paperService.count(queryWrapper));
		list.add(zprojectService.count(queryWrapper));
		list.add(hprojectService.count(queryWrapper));
		list.add(patentService.count(queryWrapper));
		list.add(softwareCopyrightService.count(queryWrapper));
		list.add(researchAchievementsService.count(queryWrapper));
		list.add(teachingRewardService.count(queryWrapper));
		list.add(publicationsService.count(queryWrapper));
		list.add(disciplineCompetitionService.count(queryWrapper));
		list.add(meetingService.count(queryWrapper));
		list.add(achievementTransformationService.count(queryWrapper));
		return list;
	}
}
